Python program to print all prime numbers in an interval